Cyclic Queuing and Forwarding (“CQF”) is a technique employed by network devices in a network to achieve zero congestion loss and deterministic latency. According to CQF, network devices cyclically queue data to, and drain data from, a plurality of buffers. For example, a queuing schedule is implemented on each network port of a network device. The plurality of buffers receive data in according with time schedules (e.g., time clocks) having an equal period but offset in phase to align with a transmitter's (e.g., another network device) cyclic buffer swapping. The queuing schedule ensures that data is cyclically directed to the buffers such that data is always stored to an idle buffer (i.e., a buffer that is not draining).
In a network implementing CQF, every flow must be limited by a maximum allocated bandwidth (e.g., a bit-time-on-the-wire per cycle). This guarantees that the network will not drop data due to network congestion. In the event a transmitter exceeds its maximum allocated bandwidth, queues will overflow and data will be lost. Thus, policing is desirable to prevent misbehaving flows. However, conventional credit-based policing is not accurate on a short-enough timescale to prevent data loss. For example, conventional credit-based policers analyze average throughput. Due to the jitter in the transmissions of any given flow, conventional credit-based policing cannot prevent a few extra packets from being directed to the buffers. In worst case scenarios, multiple input ports can each place a few extra packets into an output buffer, and as a result, the network device is unable to transmit the extra packets in one cycle.